Skip to content

Free domain check: hero, /check/<domain> links and the Deck first run - #136

Merged
Darknode-Official merged 3 commits into
mainfrom
feat/domain-check
Nov 26, 2026
Merged

Darknode-Official merged 3 commits into
mainfrom
feat/domain-check

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

What

A free, real domain check as the landing hero's main action, a shareable /check/<domain> page, and the same check as the first block of a new Deck.

Landing hero (signed out)

  • "Check your domain" field (empty, placeholder example.com, with a helper line). It runs live in the browser in a few seconds and shows an A-F grade with every check, its weight and the points it earned.
  • After a result:
    • Fix in the Deck: stores dn_first_domain and opens sign-up.
    • Copy link: copies /check/<domain>.
  • The copy is "Fix these in the Deck, free account". It does not promise ongoing watching, because monitors are Pro.
  • Hero copy changes:
    • Removed "Runs air-gapped" and "no data leaving your estate". The hero now says the CLI and desktop app run on your own machines and work offline with local Ollama models.
    • Removed the "Built with" row.
    • "Star on GitHub" is now See the Deck (/?app=1). "Scan your first repo" is now "Create a free account" (ghost style), so the domain check is the primary action.
    • The KEV panel is kept.

/check/<domain>

  • Re-runs the check live each time it is opened. Nothing is stored and the backend is unchanged.
  • Registered in routes.js isAppPath.
  • firebase.json serves the SPA for it with Cache-Control: no-cache and X-Robots-Tag: noindex. The page also sets a noindex meta tag. It is not in the sitemap.
  • Signed in, the link opens the Deck overview and runs the check there.

Deck first run

  • While the workspace has no scan yet, the overview's first block is the same check.
  • If a dn_first_domain hand-off or a /check link supplies a domain, the check runs at once and the key is then cleared.
  • Otherwise the sign-up email's work domain is offered as a one-click chip. It is never typed into the field, and never offered for free-mail domains or for Test Mode or guest sessions.
  • Results are saved two ways:
    • a Personal run (recordRun), which ticks off "Run your first scan";
    • findings through the sink kit (publishFindings("domaincheck", …)).
  • Each failing or warning check has an "Open " button. The tools it links to are Email Security, Website Headers, DNS Lookup and security.txt, all of them free.

Checks and weights (total 100)

Group Check Weight Source
Email SPF 10 DoH TXT, email-auth.js analyzeSPF
Email DMARC policy 12 DoH _dmarc (falls back to the organisational domain), analyzeDMARC
Email DKIM 6 DoH, 22 common selectors, analyzeDKIM (n/a when SPF is v=spf1 -all)
Email Mail servers (MX) 4 DoH MX (a null MX passes)
HTTPS HTTPS 12 /api/fetch proxy (net.js dnFetch)
HTTPS HTTP to HTTPS redirect 8 proxy (a closed port 80 with working HTTPS passes)
Headers HSTS 8 proxy + posture-engine gradeHeaders
Headers Content-Security-Policy 8 same
Headers Frame protection 5 same
Headers X-Content-Type-Options 4 same
Headers Referrer-Policy 3 same
DNS DNSSEC 7 DoH AD flag; SERVFAIL that resolves with cd=1 = broken (fail); unsigned = warning
DNS CAA 7 DoH CAA, climbing to the organisational domain
Disclosure security.txt 6 proxy + security-txt.js validateSecurityTxt
  • Scoring: a pass earns the full weight, a warning half, a fail nothing.
  • Failed sources: when a source fails (resolver SERVFAIL or proxy down), the check shows as Not checked and is left out of the grade. It is never counted as a pass or a zero.
  • Partial grades: the grade says how many of the 100 points it covers. If fewer than half the applicable points could be graded, the grade is N/A.
  • Letter bands: from the posture engine (A 90, B 80, C 65, D 50).
  • SPF/DMARC fixes: each fix names the change for the record that exists (for example ~all to -all, or quarantine to reject). The "publish a record" advice appears only when the record is missing.

Files

  • New:
    • public/js/check/domain-check.js (engine + grading)
    • check-view.js (shared result HTML)
    • landing-check.js (hero + /check page)
    • first-run.js (Deck block)
    • public/css/domain-check.css
    • test/check/domain-check.test.mjs (32 tests)
  • Changed:
    • public/js/landing.js (hero block only + import)
    • public/js/deck-ui.js (overview slot, check/<d> route)
    • public/js/deck/routes.js + test/deck/routes.test.mjs
    • firebase.json (/check/** headers, both sites)
    • public/index.html (stylesheet, JSON-LD feature)
    • public/js/docs.js (FAQ with every weight, changelog)
    • core/coverage.js + core/playbooks.js (domaincheck counts as external exposure)

Verification

  • npm test: 5087 passed, 0 failed.
  • npm run release:check: READY (build d9ce927a40a8).
  • node scripts/build.mjs versions the new imports.
  • Served dist/ with firebase serve on port 5061 and checked in Chromium at 1440x900 and 390x844. There were 0 console errors or warnings on every page:
    • Hero:
      • darknode.ai: B, 86/100 (SPF ~all, DMARC quarantine and unsigned DNSSEC are warnings).
      • example.com: D, 50/100 (no redirect, missing headers, no CAA, no security.txt; DKIM n/a).
      • Copy link works.
      • "Fix in the Deck" stores the domain and opens sign-up.
      • No horizontal overflow.
    • /check/darknode.ai opened directly: graded B. The title, the noindex meta tag and the canonical path were all set.
    • Deck (/?app=1 guest, ink/invert dark scheme):
      • the stored hand-off domain auto-ran and the key was cleared;
      • 9 findings were saved and showed in the Security Graph ("via domaincheck");
      • Getting started went from 0 of 3 to 1 of 3;
      • "Open Email Security" opened /emailauth;
      • no chip for the guest identity;
      • the invalid-input message is shown;
      • no clipping at 390px.

For the owner to decide

  • Certificate expiry is not checked. No existing engine gets it without crt.sh/CT, so it was left out of the fast path.
  • DKIM is a selector heuristic. It probes 22 common selectors, and "not found" is only a warning.
  • Unsigned DNSSEC and a missing security.txt are warnings, not fails.
  • No Worker change was needed.

Not merged and not deployed.

… the Deck first run

Landing hero (signed out): a "Check your domain" field runs a live check in the
browser and shows an A-F grade with every check, its weight and its points.
Email (SPF, DMARC, DKIM, MX) and DNS (DNSSEC via the AD flag, CAA) come from
public DoH; HTTPS, the HTTP to HTTPS redirect, the five security headers and
security.txt come through the existing /api/fetch proxy (net.js dnFetch). It
reuses email-auth.js, the posture engine's header grader, domainguard-engine
DNS helpers and security-txt.js. A source that fails is shown as not checked
and left out of the grade, never counted as a pass or a zero; under half of
the applicable points graded gives N/A. SPF and DMARC fixes name the change
for the record that exists instead of telling you to publish a new one.

After a result: "Fix in the Deck" (stores dn_first_domain and opens sign-up)
and "Copy link". /check/<domain> re-runs the check when opened, with nothing
stored; it is an app path, served no-cache with X-Robots-Tag noindex, and is
not in the sitemap.

Hero copy: the air-gapped and "no data leaving your estate" claims are gone
(offline is true of the CLI and desktop app with Ollama), the Built with row
is removed, and Star on GitHub becomes See the Deck.

Deck: while no scan has run, the overview opens with the same check. A
hand-off domain or a /check link runs at once and the key is cleared; the
sign-up email's work domain is offered as a chip, never typed in, and never
for free mail or a Test Mode / guest session. The result is saved as a
Personal run (ticks "Run your first scan") and as findings through the sink
kit, and each failing check links the free Deck tool that fixes it.
Domain-check findings count as external exposure in coverage and playbooks.

Docs: FAQ entry with every check and weight, changelog line, JSON-LD feature.
Tests: grading, normalisation, injected-resolver runs and the findings map.
Comment thread public/js/check/landing-check.js Fixed
Comment thread public/js/check/landing-check.js Fixed
renderPending/renderResult (check-view.js) escape every interpolated value,
including DNS and header text from the checked domain, and the domain is
validated by normalizeDomain first. The scanner does not follow the escaping
across the module boundary.
@Darknode-Official
Darknode-Official merged commit 7b51c9e into main Nov 26, 2026
10 checks passed
@Darknode-Official
Darknode-Official deleted the feat/domain-check branch November 26, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants